#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

//方法一
void strReverse_1(string &s)
{
    int start = 0;
    int end = s.size() - 1;
    while(start < end)
    {
        char tmp = s[start];
        s[start] = s[end];
        s[end] = tmp;

        start++;
        end--;

    }
}

//方法二
void strReverse_2(string &s)
{
    reverse(s.begin(),s.end());
}


int main()
{
    string s;
    while(cin >> s)
    {
        //strReverse_1(s);
        strReverse_2(s);
        cout << s << endl;
    }
    return 0;
}
